%%%%%
%%
%% This file creates the Item, ItemPacket, ItemFold, ItemEnvelope, and
%% ItemLabel datatypes, and creates macros for each.  These are for
%% various types of in-game items.
%%
%%%%%


%%%%%
%% Item macros are for normal item cards.
\DECLARESUBTYPE{Item}{TransElement}
\PRESETS{Item}{
  \FD\MYtext	{} %% longer text of item
  \FD\MYmark	{} %% possible contents of shaded ``mark'' on card
  \FD\MYbulky	{0} %% potential bulkiness
  \FD\MYcapacity{N/A} %% potential capacity
  \sd\MYlistmap	{\item\MYname\ifx\MYnumber\empty\else\ (\MYnumber)\fi}
  }


%%%%%
%% \prop
%% \unstash
%% \bulky{<number>}
%% \contain{<number>}
%%
%% \prop inside an Item macro labels the card as a prop.  \unstash
%% labels the card as unstashable.  \bulky{n} labels the card as
%% n-hands bulky.  \contain{n} labels the card with n-hands capacity.
\def\prop{%
  \append\MYmark{ ~PROP~ }}
\def\unstash{%
  \append\MYmark{ ~UNSTASHABLE~ }}
\def\bulky#1{%
  \s\MYbulky{#1}%
  \append\MYmark{\mbox{ ~\MYbulky-Hand~Bulky~ }}}
\def\contain#1{%
  \s\MYcapacity{#1}%
  \append\MYmark{\mbox{ ~\MYcapacity-Hand~Capacity~ }}}


%%%%%
%% ItemPacket macros are for item cards with an attached packet.
%% They are a subtype of Item.
\DECLARESUBTYPE{ItemPacket}{Item}
\PRESETS{ItemPacket}{
  \F\MYcontents
  }


%%%%%
%% ItemFold macros are for items represented by just a folded packet.
%% They are a subtype of ItemPacket, with the longer text and ``mark''
%% left blank, since they have no actual item card.
\DECLARESUBTYPE{ItemFold}{ItemPacket}
\PRESETS{ItemFold}{
  \s\MYmark{}
  }


%%%%%
%% ItemEnvelope macros are for items represented by just an envelope.
%% They are a subtype of ItemPacket, with the longer text and ``mark''
%% left blank, since they have no actual item card.
\DECLARESUBTYPE{ItemEnvelope}{ItemPacket}
\PRESETS{ItemEnvelope}{
  \s\MYmark{}
  }


%%%%%
%% ItemLabel macros are for small labels that would get used on
%% physreps, e.g. gun labels.  The ``mark'' is left blank, since
%% it isn't used for these.
\DECLARESUBTYPE{ItemLabel}{Item}
\PRESETS{ItemLabel}{
  \s\MYmark{}
  }


%%%%%
%% \icard[<extras>]{<name>}{<number>}{<text>}
%% \specialicard[<extras>]{<name>}{<number>}{<text>}{<mark>}
%% \itempacket[<extras>]{<name>}{<number>}{<text>}{<mark>}{<contents>}
%% \itemfold{<name>}{<number>}{<text>}{<contents>}
%% \itemenvelope{<name>}{<number>}{<text>}{<contents>}
%% \itemlabel{<name>}{<number>}{<text>}
%%
%% These are wrappers around \INSTANCE, useful for 1-shots.
%%
%% For \icard, \specialicard, and \itempacket, the optional <extras>
%% (in []'s) is for things like \unstash and \bulky{3}.  For example,
%% \icard[\prop\contain{2}]{..}{..}{..}{..} gives an item that has a
%% prop and 3-hands capacity.
%%
%% The last arg (#5) to \specialicard is for anything extra you may
%% want in the ``mark''
\newinstance{Item}{\icard[4][]}{
  \s\MYname{#2}\s\MYnumber{#3}\s\MYtext{#4}#1}
\newinstance{Item}{\specialicard[5][]}{
  \s\MYname{#2}\s\MYnumber{#3}\s\MYtext{#4}\s\MYmark{#5}#1}
\newinstance{ItemPacket}{\itempacket[6][]}{
  \s\MYname{#2}\s\MYnumber{#3}\s\MYtext{#4}\s\MYmark{#5}\s\MYcontents{#6}#1}
\newinstance{ItemFold}{\itemfold[4]}{
  \s\MYname{#1}\s\MYnumber{#2}\s\MYtext{#3}\s\MYcontents{#4}}
\newinstance{ItemEnvelope}{\itemenvelope[4]}{
  \s\MYname{#1}\s\MYnumber{#2}\s\MYtext{#3}\s\MYcontents{#4}}
\newinstance{ItemLabel}{\itemlabel[3]}{
  \s\MYname{#1}\s\MYnumber{#2}\s\MYtext{#3}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NEW{Item}{\iTest}{
  \s\MYname	{Test Item}
  \s\MYnumber	{0000}
  \s\MYtext	{A Test Item Card}
  }

\NEW{ItemPacket}{\iTestPacket}{
  \s\MYname	{Test Item}
  \s\MYnumber	{0000}
  \s\MYtext	{A Test Item with a big red button.  Open packet if
		you press the big red button.}
  \s\MYcontents	{The item beeps at you.}
  }

\NEW{ItemFold}{\iTestFold}{
  \s\MYname	{Test Food}
  \s\MYnumber	{0000}
  \s\MYtext	{open if you eat}
  \s\MYcontents	{It tastes yummy.}
  }

\NEW{ItemEnvelope}{\iTestEnvelope}{
  \s\MYname	{Test Food}
  \s\MYnumber	{0000}
  \s\MYtext	{open if you eat}
  \s\MYcontents	{It tastes yummy.}
  }

\NEW{ItemLabel}{\iTestLabel}{
  \s\MYname	{Test Gun Label}
  \s\MYnumber	{0000}
  \s\MYtext	{Disc gun, loadable to 20 shots.}
  }

\NEW{Item}{\iWhatzit}{
  \s\MYname	{Whatzit}
  \s\MYnumber	{12345}
  \s\MYtext	{If you press it, open packet a.  If you twirl it, open
		packet b.  If you pull it, open packet c.}
  \bulky	{1}
  \s\MYsigns	{\signstrip{a}{it goes ``beep.''}
		\signstrip{b}{it goes ``whoop.''}
		\signstrip{c}{it goes ``bang.''}
		}
  \s\MYabils	{\ability{Stop Crying}{By futzing with the Whatzit, you
		can make babies stop crying.}{I make the baby stop
		crying.}
		}
  }




% IN GAME

% weapons

% Swords
\NEW{Item}{\iSwordA}{
  \s\MYname	{Machete}
  \s\MYnumber	{001}
  \s\MYtext	{
  	{\bf Melee Weapon}

  	{\bf Incant: ``1 damage''}
	
	{\bf Cooldown: 4}
	
	{\bf Requires: Proficiency: Swords I}
  }
}

\NEW{Item}{\iSwordB}{
  \s\MYname	{Long Sword}
  \s\MYnumber	{002}
  \s\MYtext	{
  	{\bf Melee Weapon}

  	{\bf Incant: ``2 damage''}
	
	{\bf Cooldown: 4}
	
	{\bf Requires: Proficiency: Swords II}
  }
}

\NEW{Item}{\iSwordC}{
  \s\MYname	{Sword of Nex}
  \s\MYnumber	{003}
  \s\MYtext	{
  	{\bf Melee Weapon}

  	{\bf Incant: ``2 damage, pierce''}
	
	{\bf Cooldown: 3}
	
	{\bf Requires: Proficiency: Swords II}
  }
}

% Axes
\NEW{Item}{\iAxeA}{
  \s\MYname	{Hand Axe}
  \s\MYnumber	{011}
  \s\MYtext	{
  	{\bf Melee Weapon}

  	{\bf Incant: ``2 damage''}
	
	{\bf Cooldown: 6}
	
	{\bf Requires: Proficiency: Axes I}
  }
}

\NEW{Item}{\iAxeB}{
  \s\MYname	{Battle Axe}
  \s\MYnumber	{012}
  \s\MYtext	{
  	{\bf Melee Weapon}

  	{\bf Incant: ``3 damage''}
	
	{\bf Cooldown: 6}
	
	{\bf Requires: Proficiency: Axes II}
  }
}

\NEW{Item}{\iAxeC}{
  \s\MYname	{Norja}
  \s\MYnumber	{013}
  \s\MYtext	{
  	{\bf Melee Weapon}

  	{\bf Incant: ``4 damage, fire''}
	
	{\bf Cooldown: 6}
	
	{\bf Requires: Proficiency: Axes II}
  }
}

% Club type weapons (no proficiencies)

\NEW{Item}{\iClubA}{
  \s\MYname	{Fist}
  \s\MYnumber	{021}
  \s\MYtext	{
  	{\bf Melee Weapon}

  	{\bf Incant: ``1 damage''}
	
	{\bf Cooldown: 7}
  }
}

\NEW{Item}{\iClubB}{
  \s\MYname	{Club}
  \s\MYnumber	{022}
  \s\MYtext	{
  	{\bf Melee Weapon}

  	{\bf Incant: ``2 damage''}
	
	{\bf Cooldown: 7}
  }
}

% Throwing Weapons

\NEW{Item}{\iRockA}{
  \s\MYname	{Rock}
  \s\MYnumber	{031}
  \s\MYtext	{
  	{\bf Thrown Weapon}

  	{\bf Incant: ``1 damage''}
	
	{\bf Cooldown: 6, or 2 with Throwing 1}
  }
}

\NEW{Item}{\iRockB}{
  \s\MYname	{Shuriken}
  \s\MYnumber	{032}
  \s\MYtext	{
  	{\bf Thrown Weapon}

  	{\bf Incant: ``2 damage''}
	
	{\bf Cooldown: 2}
	
	{\bf Requires: Proficiency: Throwing II}
  }
}

\NEW{Item}{\iBombA}{
  \s\MYname	{Fire Bomb}
  \s\MYnumber	{041}
  \s\MYtext	{
  	{\bf Thrown Weapon (consumed on use)}

  	{\bf Incant: ``blast, 3 damage''}
	
	{\bf Cooldown: 2}
	
	{\bf Requires: Proficiency: Throwing I}
  }
}

\NEW{Item}{\iBombB}{
  \s\MYname	{Lightning Bomb}
  \s\MYnumber	{042}
  \s\MYtext	{
  	{\bf Thrown Weapon (consumed on use)}

  	{\bf Incant: ``5 damage''}
	
	{\bf Cooldown: 2}
	
	{\bf Requires: Proficiency: Throwing II}
  }
}

\NEW{Item}{\iBombC}{
  \s\MYname	{Sticky Bomb}
  \s\MYnumber	{043}
  \s\MYtext	{
  	{\bf Thrown Weapon (consumed on use)}

  	{\bf Incant: ``blast, root''}
	
	{\bf Cooldown: 2}
	
	{\bf Requires: Proficiency: Throwing II}
  }
}


% Ranged Weapons

\NEW{Item}{\iBowA}{
  \s\MYname	{Short Bow}
  \s\MYnumber	{051}
  \s\MYtext	{
  	{\bf Ranged Weapon}

  	{\bf Incant: ``1 damage''}
	
	{\bf Requires: Proficiency: Bows I}
  }
}

\NEW{Item}{\iBowB}{
  \s\MYname	{Bow}
  \s\MYnumber	{052}
  \s\MYtext	{
  	{\bf Ranged Weapon}

  	{\bf Incant: ``2 damage''}
	
	{\bf Requires: Proficiency: Bows II}
  }
}

\NEW{Item}{\iBowC}{
  \s\MYname	{Crookhorn Longbow}
  \s\MYnumber	{053}
  \s\MYtext	{
  	{\bf Ranged Weapon}

  	{\bf Incant: ``2 damage, root''}
	
	{\bf Requires: Proficiency: Bows II}
  }
}

% Spells

\NEW{Item}{\iFireBlast}{
  \s\MYname	{Fire Blast}
  \s\MYnumber	{101}
  \s\MYtext	{
  	{\bf Spell}
	
  	{\bf Incant: ``fire, 1 damage''}
	
	{\bf Requires: Proficiency: Fire I}
  }
}

\NEW{Item}{\iFireBall}{
  \s\MYname	{Fire Ball}
  \s\MYnumber	{103}
  \s\MYtext	{
  	{\bf Spell}

  	{\bf Incant: ``fire, 2 damage, blast''}
		
	{\bf Requires: Proficiency: Fire II}
  }
}

\NEW{Item}{\iFireHarrass}{
  \s\MYname	{Harrass}
  \s\MYnumber	{102}
  \s\MYtext	{
  	{\bf Spell}

  	{\bf Incant: ``interrupt''}
	
	{\bf Requires: Proficiency: Fire I}
  }
}

\NEW{Item}{\iFireEnchant}{
  \s\MYname	{Enchant Weapon}
  \s\MYnumber	{104}
  \s\MYtext	{
  	{\bf Spell}
	
	{\bf Requires: Proficiency: Fire II}
  }
}

\NEW{Item}{\iLightningChain}{
  \s\MYname	{Chain Lightning}
  \s\MYnumber	{111}
  \s\MYtext	{
  	{\bf Spell}
	
  	{\bf Incant: ``lightning, 1 damage, blast''}
	
	{\bf Requires: Proficiency: Lightning I}
  }
}

\NEW{Item}{\iLightningHaste}{
  \s\MYname	{Lightning Speed}
  \s\MYnumber	{112}
  \s\MYtext	{
  	{\bf Spell}
	
	{\bf Requires: Proficiency: Lightning I}
  }
}

\NEW{Item}{\iLightningBolt}{
  \s\MYname	{Lightning Bolt}
  \s\MYnumber	{113}
  \s\MYtext	{
  	{\bf Spell}
	
  	{\bf Incant: ``lightning, 3 damage''}
	
	{\bf Requires: Proficiency: Lightning II}
  }
}

\NEW{Item}{\iLightningDodge}{
  \s\MYname	{Lightning Reflexes}
  \s\MYnumber	{114}
  \s\MYtext	{
  	{\bf Spell}
	
	{\bf Requires: Proficiency: Lightning II}
  }
}

\NEW{Item}{\iEarthPushPull}{
  \s\MYname	{Gravity}
  \s\MYnumber	{123}
  \s\MYtext	{
  	{\bf Spell}
	
  	{\bf Incant: ``push or pull''}
	
	{\bf Requires: Proficiency: Earth II}
  }
}

\NEW{Item}{\iEarthSlow}{
  \s\MYname	{Sow}
  \s\MYnumber	{124}
  \s\MYtext	{
  	{\bf Spell}
	
  	{\bf Incant: ``slow''}
	
	{\bf Requires: Proficiency: Earth II}
  }
}

\NEW{Item}{\iEarthRock}{
  \s\MYname	{Hurl Rock}
  \s\MYnumber	{121}
  \s\MYtext	{
  	{\bf Spell}
	
  	{\bf Incant: ``1 damage''}
	
	{\bf Requires: Proficiency: Earth I}
  }
}

\NEW{Item}{\iEarthRoot}{
  \s\MYname	{Root}
  \s\MYnumber	{122}
  \s\MYtext	{
  	{\bf Spell}
	
  	{\bf Incant: ``root''}
	
	{\bf Requires: Proficiency: Earth I}
  }
}

%%% Defensive items

\NEW{Item}{\iShield}{
  \s\MYname	{Shield of Valor}
  \s\MYnumber	{200}
  \s\MYtext	{
  	\emph{It was rumored that even a dragon could not harm the emperor of Malan Tael when he carried this shield.}
	
	Negate the effect of any attacks that strike this shield with the exception of {\bf blast} effects.
	
	{\bf Requires: Proficiency: Armor}
  }
}

\NEW{Item}{\iArmorA}{
  \s\MYname	{Leather Armor}
  \s\MYnumber	{201}
  \s\MYtext	{
	If you have at least 1 HP and you equip this armor, gain 2 HP and increase your maximum HP by 2.  If you remove this armor, lose 2 HP.
  }
}

\NEW{Item}{\iArmorB}{
  \s\MYname	{Chitin Armor}
  \s\MYnumber	{202}
  \s\MYtext	{
	If you have at least 1 HP and you equip this armor, gain 4 HP, and increase your maximum HP by 4.  If you remove this armor, lose 4 HP.
	
	{\bf Requires: Proficiency: Armor}
  }
}

\NEW{Item}{\iArmorC}{
  \s\MYname	{Plate Armor}
  \s\MYnumber	{203}
  \s\MYtext	{
  	While wearing this armor, gain {\bf DR 1, physical}.
	
	{\bf Requires: Proficiency: Armor}
  }
}

\NEW{Item}{\iTrinketA}{
  \s\MYname	{Fire Torc}
  \s\MYnumber	{210}
  \s\MYtext	{
  	While wearing this torc, you are immune to {\bf fire} effects.
  }
}

\NEW{Item}{\iTrinketB}{
  \s\MYname	{Serpent Bracer}
  \s\MYnumber	{211}
  \s\MYtext	{
  	While wearing these bracers, you may not be inflicted by {\bf poison}.  This does not negate or prevent the damage from poison effects inflicted before wearing the bracers.
  }
}


\NEW{Item}{\iTrinketBring}{
  \s\MYname	{Serpent Ring}
  \s\MYnumber	{211}
  \s\MYtext	{
  	While wearing this ring, you may not be inflicted by {\bf poison}.  This does not negate or prevent the damage from poison effects inflicted before wearing the ring.
  }
}

%%% Potions

\NEW{Item}{\iHealingPotion}{
  \s\MYname	{Healing Potion}
  \s\MYnumber	{300}
  \s\MYtext	{
	{\bf Potion (consumed on use)}
	
	If you consume this, gain 4 HP up to your maximum HP.
  }
}

\NEW{Item}{\iHastePotion}{
  \s\MYname	{Potion of Speed}
  \s\MYnumber	{301}
  \s\MYtext	{
	{\bf Potion (consumed on use)}
	
	If you consume this, you may ignore the cooldown on your next two attacks.
  }
}

\NEW{Item}{\iAntidotePotion}{
  \s\MYname	{Antidote}
  \s\MYnumber	{302}
  \s\MYtext	{
	{\bf Potion (consumed on use)}
	
	If you consume this, you are cured of any status effects caused directly by NPC or player attacks.
  }
}


%%% OTHER ITEMS

\NEW{Item}{\iTorch}{
  \s\MYname	{Torch}
  \s\MYnumber	{400}
  \s\MYtext	{
  	A glowing torch.  This torch will burn for about 15 minutes before being extinguished.   The torch must be held above your head to work.
  }
}

\NEW{Item}{\iAmmo}{
  \s\MYname	{Arrow}
  \s\MYnumber	{000}
  \s\MYtext	{
A single arrow.
}
}

\NEW{Item}{\iSack}{
  \s\MYname	{Sack}
  \s\MYnumber	{401}
  \s\MYtext	{
  	A burlap sack.  May be used to carry in-game items.
  }
}

\NEW{Item}{\ikey}{
  \s\MYname {Key}
  \s\MYnumber{500}
  \s\MYtext{
  A golden key.
  }
  }

\NEW{Item}{\iEyeGem}{
  \s\MYname{Blue Gem}
  \s\MYnumber{501}
  \s\MYtext{A small blue gem}
  }

\NEW{Item}{\iRuby}{
  \s\MYname{Ruby}
  \s\MYnumber{502}
  \s\MYtext{
  A large red gem
  }
  }

\NEW{Item}{\iGears}{
  \s\MYname{Gear}
  \s\MYnumber{503}
  \s\MYtext{
	A massive gear.
	  }
  }

\NEW{Item}{\iMap}{
  \s\MYname{Drawing}
  \s\MYnumber{600}
  \s\MYtext{A charcoal drawing on parchment.}
  }

\NEW{Item}{\iBowl}{
  \s\MYname{Bowl}
  \s\MYnumber{601}
  \s\MYtext{A bowl}
  }


\NEW{Item}{\ibell}{
  \s\MYname{Bell}
  \s\MYnumber{900}
  \s\MYtext{A thing which makes an unfortunate amount of noise}
  }

\NEW{Item}{\iChisel}{
  \s\MYname{Chisel}
  \s\MYnumber{901}
  \s\MYtext{
	A chisel.  This could probably inscribe a message in the walls for future adventurers to find.
	  }
  }

  \NEW{Item}{\iIdol}{
  \s\MYname{Idol}
  \s\MYnumber{902}
  \s\MYtext{
	A brass idol.  It appears to be hollow, but it would take massive forces to break.
	  }
  }

  \NEW{Item}{\iScale}{
  \s\MYname{Idol}
  \s\MYnumber{903}
  \s\MYtext{
	A scale.
	  }
  }
  
    \NEW{Item}{\iExplosives}{
  \s\MYname{Explosives}
  \s\MYnumber{904}
  \s\MYtext{
	An explosive charge on a five second timer.  If you attach this to something and activate it, tell a GM.
	  }
  }

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
